package com.adxon;

import com.adxon.servlet.ServletBase;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang3.StringEscapeUtils;

public class Adxon{
	public static String jspMessage(HttpServletRequest req){
		String m=(String)req.getAttribute("Message");
		return m==null?"":"<div class=msg>"+StringEscapeUtils.escapeHtml4(m)+"</div>";
	}
	public static void jspSafe(HttpServletRequest req,HttpServletResponse resp) 
			throws ServletException, IOException{
		if(req.getAttribute("Copyright")==null)
			ServletBase.forward404(req,resp);
	}
}